<!--
 * @Author: huangtianyang 916072572@qq.com
 * @Date: 2023-05-30 14:07:29
 * @LastEditors: huangtianyang
 * @LastEditTime: 2023-10-23 10:49:00
 * @FilePath: \cxl-admin\src\App.vue
-->
<template>
    <router-view />
</template>
<script setup lang="ts">
import { userStore } from '@/store/user.store'
import { storage } from './store/sessionStorage'

/**
 * 初始化用户仓库
 */
const store = userStore()

/**
 * 从本地拉取token
 */
let token: string = storage.get('token') ?? ''

/**
 * 保存token到用户仓库
 */
store.setToken(token)
</script>

<style></style>
